<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>CPL (programming language)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/CPL_(programming_language)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-CPL_programming_language rootpage-CPL_programming_language skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">CPL (programming language)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p class="mw-empty-elt">
</p>
<style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */
.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}
/* end https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above" style="background-color:#e0e0e0;">CPL</th></tr><tr><th scope="row" class="infobox-label"><a href="Programming_paradigm" title="Programming paradigm">Paradigm</a></th><td class="infobox-data"><a href="Multi-paradigm_programming_language" class="mw-redirect" title="Multi-paradigm programming language">Multi-paradigm</a>:
<a href="Procedural_programming" title="Procedural programming">procedural</a>, <a href="Imperative_programming_language" class="mw-redirect" title="Imperative programming language">imperative</a>, <a href="Structured_programming" title="Structured programming">structured</a>, <a href="Functional_programming" title="Functional programming">functional</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_design" title="Software design">Designed by</a></th><td class="infobox-data"><a href="Christopher_Strachey" title="Christopher Strachey">Christopher Strachey</a> et al.</td></tr><tr><th scope="row" class="infobox-label">First appeared</th><td class="infobox-data">1963<span style="display:none"> (<span class="bday dtstart published updated">1963</span>)</span></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE;">Influenced by</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="ALGOL_60" title="ALGOL 60">ALGOL 60</a></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE;">Influenced</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="BCPL" title="BCPL">BCPL</a></td></tr></tbody></table>
<p><b>CPL</b> (<b>Combined Programming Language</b>) is a <a href="Multi-paradigm_programming_language" class="mw-redirect" title="Multi-paradigm programming language">multi-paradigm programming language</a> developed in the early 1960s. It is an early ancestor of the <a href="C_language" class="mw-redirect" title="C language">C language</a> via the <a href="BCPL" title="BCPL">BCPL</a> and <a href="B_(programming_language)" title="B (programming language)">B</a> languages.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Design">Design</h2></div>
<p>CPL<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> was developed initially at the Mathematical Laboratory at the <a href="University_of_Cambridge" title="University of Cambridge">University of Cambridge</a> as the "Cambridge Programming Language" and later published jointly between Cambridge and the <a href="University_of_London" title="University of London">University of London</a> Computer Unit as the "Combined Programming Language" (CPL was also nicknamed by some as "Cambridge Plus London"<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> or "Christopher's Programming Language"<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>). <a href="Christopher_Strachey" title="Christopher Strachey">Christopher Strachey</a>, <a href="David_W._Barron" title="David W. Barron">David Barron</a> and others were involved in its development. The first paper describing it was published in 1963, while it was being implemented on the <a href="Titan_(1963_computer)" title="Titan (1963 computer)">Titan Computer</a> at Cambridge and the <a href="Atlas_Computer_(Manchester)" class="mw-redirect" title="Atlas Computer (Manchester)">Atlas Computer</a> at London.
</p><p>It was heavily influenced by <a href="ALGOL_60" title="ALGOL 60">ALGOL 60</a>, but instead of being extremely small, elegant and simple, CPL was intended for a wider application area than scientific calculations and was therefore much more complex and not as elegant as ALGOL 60. CPL was a big language for its time, and it attempted to go beyond ALGOL to include industrial process control, business data processing, and possibly some early command line games.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> CPL was intended to allow low-level programming and high level abstractions using the same language.
</p><p>However, CPL was only implemented very slowly. The first CPL compiler was probably written around 1970,<sup id="cite_ref-peter_norvig_5-0" class="reference"><a href="#cite_note-peter_norvig-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> but the language never gained much popularity and seems to have disappeared without trace sometime in the 1970s.
</p><p><a href="BCPL" title="BCPL">BCPL</a> (for "Basic CPL", although originally "Bootstrap CPL") was a much simpler language based on CPL, intended primarily as a <a href="Systems_programming" title="Systems programming">systems programming</a> language, particularly for writing <a href="Compiler" title="Compiler">compilers</a>;<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> it was first implemented in 1967, prior to CPL's first implementation. BCPL then led, via <a href="B_(programming_language)" title="B (programming language)">B</a>, to the popular and influential <a href="C_(programming_language)" title="C (programming language)">C programming language</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Example">Example</h2></div>
<p>The function MAX as formulated by Peter Norvig:<sup id="cite_ref-peter_norvig_5-1" class="reference"><a href="#cite_note-peter_norvig-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<pre>Max(Items, ValueFunction) = value of
§ (Best, BestVal) = (NIL, -∞)
while Items do §
(Item, Val) = (Head(Items), ValueFunction(Head(Items)))
if Val > BestVal then (Best, BestVal) := (Item, Val)
Items := Rest(Items) ̸§
result is Best ̸§
</pre>
<p>The closing section block symbol used here (<code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr"≯§</code>) is an approximation of the original symbol, in which the cross stroke is vertical. This is available in Unicode as <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">§⃒</code> but does not display correctly on many systems.
</p>
<div class="mw-heading mw-heading2"><h2 id="Implementations">Implementations</h2></div>
<p>It is thought that CPL was never fully implemented in the 1960s, existing as a theoretical construct with some research work on partial implementations.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p><p><a href="Peter_Norvig" title="Peter Norvig">Peter Norvig</a> has written (for Yapps, a Python <a href="Compiler-compiler" title="Compiler-compiler">compiler-compiler</a>) a simple CPL to <a href="Python_(programming_language)" title="Python (programming language)">Python</a> translator for modern machines.<sup id="cite_ref-peter_norvig_5-2" class="reference"><a href="#cite_note-peter_norvig-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><i><a href="Fundamental_Concepts_in_Programming_Languages" title="Fundamental Concepts in Programming Languages">Fundamental Concepts in Programming Languages</a></i></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFBarronBuxtonHartleyNixon1963" class="citation journal cs1">Barron, D. W.; Buxton, J. N.; Hartley, D. F.; Nixon, E.; Strachey, C. (1 August 1963). <a rel="nofollow" class="external text" href="https://doi.org/10.1093%2Fcomjnl%2F6.2.134">"The Main Features of CPL"</a>. <i>The Computer Journal</i>. <b>6</b> (2): <span class="nowrap">134–</span>143. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1093%2Fcomjnl%2F6.2.134">10.1093/comjnl/6.2.134</a></span>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0010-4620">0010-4620</a>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.lysator.liu.se/c/clive-on-history.html">"Clive Feather on CPL and BCPL"</a>. Lysator.liu.se<span class="reference-accessdate">. Retrieved <span class="nowrap">18 August</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFJensen2020" class="citation news cs1">Jensen, Richard (9 December 2020). <a rel="nofollow" class="external text" href="https://arstechnica.com/features/2020/12/a-damn-stupid-thing-to-do-the-origins-of-c/">""A damn stupid thing to do"—the origins of C"</a>. <i>Ars Technica</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 December</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFYadav2005" class="citation book cs1">Yadav, P. (2005). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=-aBnYOHMNjUC&q=CPL+attempted+to+go+beyond+ALGOL&pg=PA180"><i>Computer and Languages</i></a>. Discovery Publishing House. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-81-8356-041-2</bdi>.</cite></span>
</li>
<li id="cite_note-peter_norvig-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-peter_norvig_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-peter_norvig_5-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-peter_norvig_5-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFNorvig2011" class="citation news cs1"><a href="Peter_Norvig" title="Peter Norvig">Norvig, Peter</a> (23 August 2011). <a rel="nofollow" class="external text" href="https://blogs.scientificamerican.com/at-scientific-american/systems-analysis-look-back-1966-scientific-american-article/">"Prescient but Not Perfect: A Look Back at a 1966 Scientific American Article on Systems Analysis"</a>. <i>Scientific American Blog Network</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 December</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFMitchellApt2003" class="citation book cs1">Mitchell, John C.; <a href="Krzysztof_R._Apt" title="Krzysztof R. Apt">Apt, Krzysztof</a> (2003). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=7Uh8XGfJbEIC&q=bcpl+programming+language&pg=PA100"><i>Concepts in Programming Languages</i></a>. Cambridge University Press. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-521-78098-8</bdi>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite id="CITEREFCoulouris1968" class="citation journal cs1"><a href="George_Coulouris_(computer_scientist)" title="George Coulouris (computer scientist)">Coulouris, G. F.</a> (1 January 1968). <a rel="nofollow" class="external text" href="https://doi.org/10.1093%2Fcomjnl%2F11.1.26">"The London CPL1 compiler"</a>. <i>The Computer Journal</i>. <b>11</b>: <span class="nowrap">26–</span>30. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1093%2Fcomjnl%2F11.1.26">10.1093/comjnl/11.1.26</a></span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite id="CITEREFCoulouris2013" class="citation web cs1"><a href="George_Coulouris_(computer_scientist)" title="George Coulouris (computer scientist)">Coulouris, George</a> (2013). <a rel="nofollow" class="external text" href="http://www.cs.man.ac.uk/CCS/res/res62.htm#d">"Computer Resurrection Issue 62 / The Compiler Compiler - Reflections of a User 50 Years On / The CPL1 Compiler"</a>. <i>Computer Conservation Society</i><span class="reference-accessdate">. Retrieved <span class="nowrap">3 May</span> 2023</span>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFNorvig" class="citation web cs1">Norvig, Peter. <a rel="nofollow" class="external text" href="http://norvig.com/sciam/checkers-complete.html">"Complete Annotated Checkers Program"</a>. <i>norvig.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">11 June</span> 2021</span>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="Bibliography">Bibliography</h2></div>
<ul><li>How BCPL evolved from CPL, Martin Richards, 2011 <a rel="nofollow" class="external autonumber" href="https://www.cl.cam.ac.uk/~mr10/cpl2bcpl.pdf">[1]</a></li>
<li>Collected papers of Christopher Strachey, section pertaining to CPL, archived at the Bodleian Library, Oxford; <a rel="nofollow" class="external text" href="http://www.nationalarchives.gov.uk/a2a/records.aspx?cat=161-csac71180&cid=3-5-1#3-5-1">CSAC 71.1.80/C.136-C.184</a></li>
<li>D. W. Barron, J. N. Buxton, D. F. Hartley, E. Nixon, and C. Strachey. <a href="https://doi.org/10.1093/comjnl/6.2.134" class="extiw external" title="doi:10.1093/comjnl/6.2.134">"The main features of CPL"</a> <i>The Computer Journal</i> <b>6</b>:2:134-143 (1963), available <a rel="nofollow" class="external text" href="http://www.math.bas.bg/~bantchev/place/cpl/features.pdf">online</a>.</li>
<li>J. Buxton, J. C. Gray, and D. Park. <a rel="nofollow" class="external text" href="http://www.ancientgeek.org.uk/CPL/CPL_Elementary_Programming_Manual.pdf">CPL Elementary Programming Manual, Edition II (Cambridge)</a> (1966).</li>
<li>University of London Institute of Computer Science and The Mathematical Laboratory, Cambridge. <a rel="nofollow" class="external text" href="http://www.ancientgeek.org.uk/CPL/CPL_Working_Papers.pdf">CPL Working Papers</a> (1966).</li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-03" href="https://en.wikipedia.org/wiki/?title=CPL_(programming_language)&oldid=1298542859">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>